<?php
namespace Common\Model;

use Think\Model\RelationModel;

class PriceModel extends RelationModel
{
    //关联到对应的省份
    protected $_link = array(
        'province'=>array(
            'mapping_type'  => self::BELONGS_TO,
            'class_name'    => 'Address',
            'foreign_key'   => 'province_id',
            'mapping_fields'=> 'name'
        )
    );
}